<?php

namespace App\Kuafu\Wechat\Enum;

use App\Kuafu\Base\Enum\BaseCodeEnum;

class WechatCodeEnum extends BaseCodeEnum
{
    public const  OK                   = 0;
    public const  APPID_ERROR          = 412001;
    public const  ILLEGAL_AES_KRY      = 412002;
    public const  ILLEGAL_IV           = 412003;
    public const  ILLEGAL_BUFFER       = 412004;
    public const  DECODE_BASE_64_ERROR = 412005;
    public const  ILLEGAL_BUFFER_APPID = 412006;
    public const  ERR_USER_REFUSE      = 412007;
    public const  ERR_PUBLIC_TOKEN     = 412008;
    public const  ERR_GET_PUBLIC_TOKEN = 412009;

    public const CODE_TEXT = [
        self::APPID_ERROR          => 'appid错误',
        self::ILLEGAL_AES_KRY      => 'encodingAesKey 非法',
        self::ILLEGAL_IV           => 'IllegalIv 非法',
        self::ILLEGAL_BUFFER       => '解密后得到的buffer非法',
        self::ILLEGAL_BUFFER_APPID => '解密后得到的buffer-appid非法',
        self::DECODE_BASE_64_ERROR => 'base64解密失败',
        self::ERR_USER_REFUSE      => 'user refuse to accept the msg',
        self::ERR_GET_PUBLIC_TOKEN => '获取公众号token失败',
    ];
}
